﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucListItem.ascx.cs" Inherits="Admin_ucControl_ucListItem" %>
  <div id="tabledata" class="section">
        <h2 class="ico_mug">
            List News</h2>
        <asp:HyperLink ID="hypNews_new" runat="server" Style="color: Blue" NavigateUrl="~/Admin/Them-moi-san-pham.aspx">
            <h3>Thêm Mới Sản Phẩm</h3>
        </asp:HyperLink>
        <br />
        <table style="width: 100%; class="yui">
            <tr>
                <td>
                    Tên Sản Phẩm:
                    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                </td>
                <td>
                    Loại Sản Phẩm:
                    <asp:DropDownList ID="drCategory" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Button ID="btnSearch_1" OnClick="btnSearch_1_Onclick" runat="server" Text="Lọc Dữ Liệu" />
                </td>
                <td style="text-align:right">
                <%--<asp:CheckBox ID="ck" runat="server" />--%>
                    <asp:Button ID="btnDel" runat="server" OnClick="btnDel_Onclick" Text="Xóa Theo Check box" />
                </td>
            </tr>
        </table>
        <asp:GridView ID="grdItems" runat="server" CssClass="yui" 
            AutoGenerateColumns="False" EmptyDataText="Không có Sản phẩm nào"
            Width="100%" CellPadding="4" BackColor="White" BorderColor="#CC9966" BorderStyle="None"
            BorderWidth="1px" AllowPaging="True" PageSize="15" OnPageIndexChanging="grdItems_PageIndexChanging"
            OnRowDataBound="grdItems_RowDataBound" 
            >
            <RowStyle BackColor="White" ForeColor="#330099" />
            <Columns>
                <asp:BoundField DataField="ItemID" HeaderText="ID" />
                <asp:HyperLinkField DataNavigateUrlFields="ItemID" DataTextField="ItemName" HeaderText="Tên Sản Phẩm"
                    DataNavigateUrlFormatString="~/Admin/Them-moi-san-pham.aspx?id={0}">
                    <ItemStyle ForeColor="Blue" />
                </asp:HyperLinkField>
                <asp:HyperLinkField DataNavigateUrlFields="CateID" DataTextField="CateName" HeaderText="Loại Sản Phẩm"
                    DataNavigateUrlFormatString="~/Admin/ListCategory.aspx" />
                <asp:TemplateField HeaderText="Giá">
                    <ItemTemplate>
                        <asp:HiddenField ID="hidField1" runat="server" />
                        <asp:CheckBox ID="checkGia" runat="server" OnCheckedChanged="checkGia_CheckedChanged"
                            AutoPostBack="true" />
                        <asp:TextBox ID="txtGia" Style="width: 46px" runat="server"></asp:TextBox>
                        <asp:ImageButton ID="btnSave" runat="server" ToolTip="Cập Nhật Giá" CommandName="Save"
                            OnClick="btnSave_Click" CommandArgument='<%# Eval("ItemID") %>' ImageUrl="~/Admin/img/save.png" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="100px" />
                    <HeaderStyle HorizontalAlign="Center" ForeColor="White" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Confirm">
                    <ItemTemplate>
                        <asp:ImageButton ID="btnUpdate" runat="server" ToolTip="Sửa Sản Phẩm" CommandName="Confirm"
                            OnClick="btnUpdate_Click" CommandArgument='<%# Eval("ItemID") %>' ImageUrl="~/Admin/img/config.png" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="btnConfirm" runat="server" ToolTip="Xóa Sản Phẩm" CommandName="Delete"
                            OnClick="btnConfirm_Click" CommandArgument='<%# Eval("ItemID") %>' ImageUrl="~/Admin/img/Del.png" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="70px" />
                    <HeaderStyle HorizontalAlign="Center" ForeColor="White" />
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="clsGrdHeader" />
            <RowStyle CssClass="clsGrdRow" />
            <AlternatingRowStyle CssClass="clsGrdAlternateRow" />
            <PagerStyle CssClass="clsPage" />
        </asp:GridView>
        <br />
        <%--<div class="pagination">
            <span class="pages">Page 1 of 3&#8201;</span> <span class="current">1</span> <a href="#"
                title="2">2</a> <a href="#" title="3">3</a> <a href="#">&raquo;</a>
        </div>--%>
    </div>